package com.fh.alipay.mapper;

import com.fh.alipay.po.LqiMerchant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import com.fh.alipay.model.query.LqiMerchantQuery;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @author fh
 * @date 2022-05-03
 * @description  猎奇商户 Mapper 接口
 */
@Repository
public interface LqiMerchantMapper extends BaseMapper<LqiMerchant> {

    IPage<LqiMerchant> getWithPage(Page page, @Param("query") LqiMerchantQuery query);

    /**
     * 新增后返回id
     * @param po
     * @return
    */
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    Long insertReturnId(@Param("po") LqiMerchant po);

    int getCountByQuery(@Param("query") LqiMerchantQuery query);

    LqiMerchant getOneByQuery(@Param("query") LqiMerchantQuery query);

    List<LqiMerchant> getAllByQuery(@Param("query") LqiMerchantQuery query);

}
